import babel from 'rollup-plugin-babel'
import json from 'rollup-plugin-json'

const input = [['./src/index.js', 'core'], ['./src/plugins/index.js', 'plugins']]

export default input.map(item => ({
	input: item[0],
	output: {
		format: 'umd',
		file: `./${item[1]}/index.js`,
		name: 'stat',
		// globals: {
		// 	'stat/core': './src/core.js',
		// 	'stat/vue': './src/vue-core.js',
		// 	'stat/client': './src/client-core.js',
		// },
	},
	plugins: [
		json(),
		babel({
			externalHelpers: true,
			runtimeHelpers: true,
			exclude: ['node_modules/**'],
		}),
	],
	
	// sourceMap: true,
}))